package com.ruoyi.yyq.api.factory;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.yyq.api.RemoteCarEvaluationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteCarEvaluationFallbackFactory implements FallbackFactory<RemoteCarEvaluationService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteCarEvaluationFallbackFactory.class);
    @Override
    public RemoteCarEvaluationService create(Throwable cause) {
        log.error("服务调用失败:{}", cause.getMessage());
        return new RemoteCarEvaluationService(){


            @Override
            public AjaxResult listByMid(Long mid, String source) {
                return null;
            }
        };
    }
}
